
const { invoke } = window.__TAURI__.core;

let greetInputEl;
let greetMsgEl;

async function greet() {
  // Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
  greetMsgEl.textContent = await invoke("greet", { name: greetInputEl.value });
}



window.addEventListener("DOMContentLoaded", () => {
  greetInputEl = document.querySelector("#greet-input");
  greetMsgEl = document.querySelector("#greet-msg");
  document.querySelector("#greet-form").addEventListener("submit", (e) => {
    e.preventDefault();
    greet();
  });


  document.querySelector("#gotoIndex1")?.addEventListener("click", (e) => {
     window.location.href="index1.html"
  });

  document.querySelector("#gotoIndex")?.addEventListener("click", (e) => {
    window.location.href="index.html"
  });

  document.querySelector("#gotoCamera")?.addEventListener("click", (e) => {
    window.location.href="camera.html"
  });

  



});


